import java.util.Scanner;

public class MemberTesting {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        Members x = new Members();
        x.xxx();
        while (true) {
            System.out.println("请输入要选择的功能:1,新会员开卡, 2.积分增长,3.兑换礼品");
            int a = in.nextInt();
            if (a == 1) {
                System.out.print("请输入会员姓名:");
                String name = in.next();
                System.out.print("请输入会员号:");
                String MembershipNo = in.next();
                System.out.print("请输入会员手机号:");
                String MobilePhoneNo = in.next();
                if (x.kaika(name, MembershipNo, MobilePhoneNo)) {
                    System.out.println("录入成功");
                } else {
                    System.out.println("录入失败");
                }
                x.show();
            } else if (a == 2) {
                System.out.print("输入要涨分的会员号:");
                String cardNo = in.next();
                System.out.print("输入要涨分多少:");
                int fen = in.nextInt();
                if (x.inc(cardNo, fen)) {
                    System.out.println("涨粉成功");
                } else {
                    System.out.println("查无此人");
                }

            } else if (a == 3) {
                System.out.println("1：100分兑换餐巾纸一包；\n2：400分兑换剃须刀一把；\n3：1000分兑换炒锅一个；");
                System.out.println("选择要兑换的礼品:");
                int aa = in.nextInt();
                System.out.println("输入卡号:");
                String cardNo = in.next();
                System.out.println(x.duihuan(cardNo, aa));
            }

        }
    }
}
